{extend name='common/base'}
{block name="content"}
<!-- Panel Other -->
<div class="ibox float-e-margins">
    <div class="ibox-title">
        <h5>管理员列表</h5>
    </div>
    <div class="ibox-content">
        <div class="row row-lg">
            <div class="col-sm-12">
                <!--搜索框开始-->
                <form id='commentForm'  method="post" class="form-inline">
                    <div class="form-group">
                        <input type="text" class="form-control" placeholder="管理员名称" id="username" name="user_name">
                    </div>
                    <div class="form-group">
                        <input type="text" class="form-control" placeholder="商户名称" id="name" name="name">
                    </div>
                    <div class="form-group">
                        <input type="text" class="form-control" id="mch_account" placeholder="商户账号" name="mch_account">
                    </div>
                    <div class="form-group">
                        <input type="text" class="form-control" id="mobile" placeholder="手机号" name="mobile">
                    </div>
                    <div class="form-group">
                        <input type="text" class="form-control" id="email" placeholder="邮箱" name="mobile">
                    </div>
                    <div class="form-group">
                        <button class="btn btn-primary" type="button" style="margin-top:5px" id="search"><strong>搜 索</strong>
                        </button>
                    </div>
                </form>
                <!--搜索框结束-->
                <div class="btn-group-sm" id="toolbar">
                    <button class="btn btn-default btn-outline" type="button" name="refresh" aria-label="refresh" title="刷新">
                        <i class="fa fa-refresh"></i>
                    </button>

                    <button type="button" id="add" class="btn btn-primary button-margin" onclick="CodeGoods.add()">
                        <i class="fa fa-plus"></i>&nbsp;添加
                    </button>

                    <button type="button" id="edit" class="btn btn-warning button-margin" onclick="CodeGoods.edit()">
                        <i class="fa fa-edit"></i>&nbsp;编辑
                    </button>

                    <button type="button" id="del" class="btn btn-danger button-margin" onclick="CodeGoods.del()">
                        <i class="fa fa-trash"></i>&nbsp;删除
                    </button>
                </div>
                <table id="cusTable" class="table table-bordered">
                </table>
            </div>
        </div>
    </div>
</div>
<!-- End Panel Other -->
{/block}

{block name="script"}
<script type="text/javascript">
    function initTable() {
        //先销毁表格
        $('#cusTable').bootstrapTable('destroy');
        //初始化表格,动态从服务器加载数据
        $("#cusTable").bootstrapTable({
            method: "get",  //使用get请求到服务器获取数据
            url: "{:url('admin/index')}", //获取数据的地址
            striped: true,  //表格显示条纹
            toolbar: '#toolbar',              //工具按钮用哪个容器
            toolbarAlign:'left',
            showColumns: true,                  //是否显示所有的列（选择显示的列）
            showRefresh: true,                  //是否显示刷新按钮
            clickToSelect: true,                //是否启用点击选中行
            showToggle: true,                   //是否显示详细视图和列表视图的切换按钮
            cardView: false,                    //是否显示详细视图
            silent: true,
            strictSearch: true,
            pagination: true, //启动分页
            pageSize: 10,  //每页显示的记录数
            pageNumber:1, //当前第几页
            pageList: [5, 10, 15, 20, 25],  //记录数可选列表
            sidePagination: "server", //表示服务端请求
            paginationFirstText: "首页",
            paginationPreText: "上一页",
            paginationNextText: "下一页",
            paginationLastText: "尾页",
            queryParamsType : "undefined",
            columns:[[
                {checkbox: true,fixed: true},
                {field:'id',title:'主键'},
                {field:'user_name',title:'管理员名称'},
                {field:'nick_name',title:'昵称'},
                {field:'email',title:'邮箱'},
                {field:'login_times',title:'登录次数'},
                {field:'last_login_ip',title:'上次登录ip'},
                {field:'last_login_time',title:'上次登录时间'},
                {field:'status',title:'状态',formatter:function (value) {
                    if(value=='1'){
                        return '<span class="text-navy"><i class="fa fa-circle"></i> 启用</span>';
                    }else if (value=='2'){
                        return '<span class="text-danger"><i class="fa fa-circle"></i> 禁用</span>';
                    }
                }},
                {field:'operate',title:'操作'}
            ]],
            queryParams: function queryParams(params) {   //设置查询参数
                var param = {
                    pageNumber: params.pageNumber,
                    pageSize: params.pageSize,
                    searchText:$('#title').val()
                };
                return param;
            },
            onLoadSuccess: function(res){  //加载成功时执行
                if(1== res.code){
                    window.location.reload();
                }
                layer.load(0, {shade: false,time:1000});
            },
            onLoadError: function(){  //加载失败时执行
                layer.msg("加载数据失败");
            }
        });
    }

    $(document).ready(function () {
        //调用函数，初始化表格
        initTable();
        $("td,th").addClass("text-center");
        //当点击查询按钮的时候执行
        $("#search").bind("click", initTable);

    });

    CodeGoods.add = function (value) {
        var url = location.search;
        var index = layer.open({type: 2,title: '创建数据',area: ['800px', '100%'],fix: false, maxmin: true,content: Feng.ctxPath + '/Member/add'+url});
        this.layerIndex = index;
    }
</script>
{/block}
[ 三方请求结果 ] 请求失败,失败结果为：
error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol-- getinfo =>{"url":"https:\/\/df.hnbankchina.com.cn:16170\/api\/v1\/token","content_type":null,"http_code":0,"header_size":0,"request_size":0,"filetime":-1,"ssl_verify_result":1,"redirect_count":0,"total_time":0.155437,"namelookup_time":0.116018,"connect_time":0.132687,"pretransfer_time":0,"size_upload":0,"size_download":0,"speed_download":0,"speed_upload":0,"download_content_length":-1,"upload_content_length":-1,"starttransfer_time":0,"redirect_time":0,"redirect_url":"","primary_ip":"153.0.128.42","certinfo":[],"primary_port":16170,"local_ip":"172.16.0.16","local_port":52984}



[ 三方请求结果 ] Q201909172167f4491f4eac01098 ==>   请求失败,失败结果为：


Recv failure: Connection reset by peer-- getinfo =>{"url":"http:\/\/df.hnbankchina.com.cn:16170\/api\/v1\/df\/order","content_type":null,"http_code":0,"header_size":0,"request_size":605,"filetime":-1,"ssl_verify_result":0,"redirect_count":0,"total_time":0.187309,"namelookup_time":0.096824,"connect_time":0.111794,"pretransfer_time":0.111841,"size_upload":395,"size_download":0,"speed_download":0,"speed_upload":2112,"download_content_length":-1,"upload_content_length":395,"starttransfer_time":0,"redirect_time":0,"redirect_url":"","primary_ip":"202.100.231.27","certinfo":[],"primary_port":16170,"local_ip":"172.16.0.16","local_port":51972}

[ 三方请求结果 ] 请求失败,失败结果为：

error:1409442E:SSL routines:ssl3_read_bytes:tlsv1 alert protocol version-- getinfo =>{"url":"https:\/\/df.hnbankchina.com.cn:16170\/api\/v1\/token","content_type":null,"http_code":0,"header_size":0,"request_size":0,"filetime":-1,"ssl_verify_result":1,"redirect_count":0,"total_time":0.136728,"namelookup_time":0.09883,"connect_time":0.115488,"pretransfer_time":0,"size_upload":0,"size_download":0,"speed_download":0,"speed_upload":0,"download_content_length":-1,"upload_content_length":-1,"starttransfer_time":0,"redirect_time":0,"redirect_url":"","primary_ip":"153.0.128.42","certinfo":[],"primary_port":16170,"local_ip":"172.16.0.16","local_port":41032}


